package com.example.perplonews.a_c_network

import com.example.perplonews.a_b_entity.*
import com.example.perplonews.a_d_fragment.b_perplo.entity.UserLoveEntity
import com.example.perplonews.a_d_fragment.c_video.entity.SmallVideo
import com.example.perplonews.a_d_fragment.c_video.entity.VideoNewsEntity
import io.reactivex.Observable
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.*


interface Api {
    companion object{
        //    String BaseUrl = "http://118.195.161.134:8088/";//生产环境地址
        var BaseUrl = "http://118.195.161.134:8066/" //测试环境地址


        var FileUrl = "http://118.195.161.134:8066/fileDownload?fileName="
    }

    @GET("/index?type=top&key=e3080ff4a57ed090c999dc0d9082dce4")
    fun reqnews():Observable<SmallVideo>

    @POST("sysToken/getToken")
    fun requestToken(@Body body: RequestBody?): Observable<ToKenEntity?>?

    @POST("sysUser/loginUser")
    fun requestLogin(@Body body: RequestBody?): Observable<ResponseUserEntity?>?

    @POST("sysUser/registerUser")
    fun requestRegister(@Body body: RequestBody?): Observable<ResponseUserEntity?>?

    @POST("sysUser/userValues")
    fun requestUser(@Body body: RequestBody?): Observable<ResponseUserEntity?>?
//
//    @POST("sysUser/updateUser")
//    fun requestUpdateUser(@Body body: RequestBody?): Observable<UpdateUserEntity?>?
//
//    @POST("sysNews/channelNews")
//    fun requestNews(@Body body: RequestBody?): Observable<NewsEntity?>?
//
    @POST("sysChannel/userChannel")
    fun requestUserChannels(@Body body: RequestBody): Observable<ChannelEntity>
//
    @POST("sysBanner/textBannerNews")
    fun requestTextBanner(): Observable<TextBannerEntity>
//
    @POST("sysBanner/bannerNews")
    fun requestImageBanner(): Observable<ImageBannerEntity>
//
//    @POST("sysNews/hotNews")
//    fun requestRecommendNews(): Observable<RecommendEntity?>?
//
    @POST("sysNews/followNews")
    fun requestFollowNews(@Body body: RequestBody): Observable<FollowAntivity>
//
    @POST("sysFollow/selFollow")
    fun requestUserFollow(@Body body: RequestBody): Observable<UserLoveEntity>
//
    @POST("sysNews/videoNews")
    fun requestVideoNews(@Body body: RequestBody?): Observable<VideoNewsEntity>
//
//    @POST("sysLive/selLive")
//    fun requestLives(@Body body: RequestBody?): Observable<LiveEntity?>?
//
//    @POST("sysComment/selComment")
//    fun requestComments(@Body body: RequestBody?): Observable<CommentEntity?>?
//
//    @POST("sysComment/addComment")
//    fun requestaddComment(@Body body: RequestBody?): Observable<BaseEntity?>?
//
//    @POST("sysLiveComment/addComment")
//    fun requestaddLiveComment(@Body body: RequestBody?): Observable<BaseEntity?>?
//
//    @POST("sysLiveComment/selLiveComment")
//    fun requestselLiveComment(@Body body: RequestBody?): Observable<LiveCommentEntity?>?
//
    @POST("sysChannel/moreChannel")
    fun requestMoreChannels(@Body body: RequestBody): Observable<MoreChannel>
//
//    @POST("sysChannel/localChannel")
//    fun requestLocalChannels(@Body body: RequestBody?): Observable<LocalChannel?>?
//
//    @POST("sysChannel/collectionChannel")
//    fun requestCollectionChannels(@Body body: RequestBody?): Observable<BaseEntity?>?
//
//    @Multipart
//    @POST("fileUpload")
//    fun requestUploadHead(@Part parts: List<MultipartBody.Part?>?): Observable<UploadFileEntity?>?
}